<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>Yjs Prosemirror Versions Example</title>
    <script type="text/javascript" src="./dist/prosemirror-versions.bundle.js" async></script>
    <link rel=stylesheet href="./prosemirror.css" async defer>
    <link rel=stylesheet href="./version.css" async defer>
    <style>
      placeholder {
        display: inline;
        border: 1px solid #ccc;
        color: #ccc;
      }
      placeholder:after {
        content: "☁";
        font-size: 200%;
        line-height: 0.1;
        font-weight: bold;
      }
      .ProseMirror img { max-width: 100px }
      /* this is a rough fix for the first cursor position when the first paragraph is empty */
      .ProseMirror > .ProseMirror-yjs-cursor:first-child {
        margin-top: 16px;
      }
      .ProseMirror p:first-child, .ProseMirror h1:first-child, .ProseMirror h2:first-child, .ProseMirror h3:first-child, .ProseMirror h4:first-child, .ProseMirror h5:first-child, .ProseMirror h6:first-child {
        margin-top: 16px
      }
      .ProseMirror-yjs-cursor {
        position: absolute;
        border-left: black;
        border-left-style: solid;
        border-left-width: 2px;
        border-color: orange;
        height: 1em;
        word-break: normal;
        pointer-events: none;
      }
      .ProseMirror-yjs-cursor > div {
        position: relative;
        top: -1.05em;
        font-size: 13px;
        background-color: rgb(250, 129, 0);
        font-family: serif;
        font-style: normal;
        font-weight: normal;
        line-height: normal;
        user-select: none;
        color: white;
        padding-left: 2px;
        padding-right: 2px;
      }
      #y-functions {
        position: absolute;
        top: 20px;
        right: 20px;
      }
      #y-functions > * {
        display: inline-block;
      }
    </style>
</head>
<body>
  <div id="y-functions">
    <div id="y-version"></div>
    <button type="button" id="y-connect-btn">Disconnect</button>
  </div>
  <p></p>
  <p>This is a demo of the <a href="https://github.com/yjs/yjs">Yjs</a> ⇔ <a href="http://prosemirror.net/">ProseMirror</a> binding: <a href="https://github.com/yjs/y-prosemirror">y-prosemirror</a>.</p>
  <p>The content of this editor is shared with every client that visits this domain.</p>
</body>
</html>
